import request from '@/utils/request_axios'

// 全部数据
export function queryReportView(data) {
  return request({
    url: '/hp/reportCard',
    method: 'get',
    data
  })
}

// 根据ID查询详情 参数 id
export function cardDataEcho(id) {
  return request({
    url: '/hp/reportCard/person',
    method: 'get',
    show: true,
    data: {
      id
    }
  })
}

// 修改报告卡数据并提交
export function editReportCard(data) {
  return request({
    url: '/hp/reportCard',
    method: 'put',
    data
  })
}

// 审核
export function viewReportCard(data) {
  return request({
    url: '/hp/reportCard/check',
    method: 'get',
    data
  })
}

// 删除
export function deleteReportCard(id) {
  return request({
    url: '/hp/reportCard/person/delete',
    method: 'delete',
    show: true,
    data: {
      id
    }
  })
}

// 字典 日期类型
export function viewDateType (dateType) {
  return request({
    url: 'hp/permission/getCode',
    method: 'get',
    show: true,
    data: {
      id: dateType
    }
  })
}

/**
 * 导出
 */
export function exportData (data) {
  return request({
    url: 'hp/reportCard/checkExport',
    method: 'post',
    data
  })
}
